/*
 * Copyright 2015 Victor Albertos
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.rx_cache;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * 作用于方法上给缓存加密
 *
 * 如果需要给某个请求接口的缓存做加密的操作,则在对应的方法上加上@Encrypt,在存储和获取缓存时
 * ,RxCache就会使用@EncryptKey的值作为Key给缓存数据进行加解密
 * ,因此每个Providers中的所有的方法都只能使用相同的Key进行加解密
 *
 * 值得注意的是,RxCache只会给本地缓存进行加密操作,并不会给内存缓存进行加密
 * ,给本地数据加密使用的是Java自带的CipherInputStream,解密使用的是CipherOutputStream
 *
 * {@link EncryptKey}.
 */
@Target(METHOD)
@Retention(RUNTIME)
public @interface Encrypt {
}



